package coco.wx.com.module.question.service.impl;

import coco.wx.com.common.dto.TempMap;
import coco.wx.com.module.question.entity.Question;
import coco.wx.com.module.question.mapper.QuestionMapper;
import coco.wx.com.module.question.service.QuestionService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

/**
 *  服务实现类
 *
 * @author srx
 * @since 2020-10-23
 */
@Service
public class QuestionServiceImpl extends ServiceImpl<QuestionMapper, Question> implements QuestionService {

    @Resource
    private QuestionMapper questionMapper;

    @Override
    public ResponseEntity<Object> getQuestionsSort(TempMap dto) {
        return ResponseEntity.ok().body(questionMapper.getQuestionsSort(dto));
    }

    @Override
    public ResponseEntity<Object> getQuestionsNoSort(TempMap dto) {
        return ResponseEntity.ok().body(questionMapper.getQuestionsNoSort(dto));
    }
}
